{	Problem: http://codeforces.ru/problemset/problem/60/B
	Verdict: Accepted

}
var k,n,m,r,h,t,i,j,g,x,y:longint; q:array[1..1001,1..3] of longint; a:Array[0..11,0..11,0..11] of byte; c:char;
begin
Readln(k,n,m);
readln;
fillchar(a,sizeof(a),0);
for i:=1 to k do begin
  for j:=1 to n do begin
    for g:=1 to m do begin
      read(c);
      if c='#' then a[i][j][g]:=4 else
      if c='.' then a[i][j][g]:=1;
    end;
    readln;
  end;  
  readln;
end;
readln(x,y);
h:=1;
t:=1;
q[1][1]:=1;
q[1][2]:=x;
q[1][3]:=y;
r:=0;
while h<=t do begin
  if a[q[h][1]][q[h][2]][q[h][3]]=1 then begin
    inc(r);
    a[q[h][1]][q[h][2]][q[h][3]]:=2;
  end;
  if a[q[h][1]-1][q[h][2]][q[h][3]]=1 then begin
    inc(r);
    inc(t);
    q[t][1]:=q[h][1]-1;
    q[t][2]:=q[h][2];
    q[t][3]:=q[h][3];
    a[q[h][1]-1][q[h][2]][q[h][3]]:=2;
  end;  
  if a[q[h][1]+1][q[h][2]][q[h][3]]=1 then begin
    inc(r);
    inc(t);
    q[t][1]:=q[h][1]+1;
    q[t][2]:=q[h][2];
    q[t][3]:=q[h][3];
    a[q[h][1]+1][q[h][2]][q[h][3]]:=2;
  end;
  if a[q[h][1]][q[h][2]-1][q[h][3]]=1 then begin
    inc(r);
    inc(t);
    q[t][1]:=q[h][1];
    q[t][2]:=q[h][2]-1;
    q[t][3]:=q[h][3];
    a[q[h][1]][q[h][2]-1][q[h][3]]:=2;
  end;
  if a[q[h][1]][q[h][2]+1][q[h][3]]=1 then begin
    inc(r);
    inc(t);
    q[t][1]:=q[h][1];
    q[t][2]:=q[h][2]+1;
    q[t][3]:=q[h][3];
    a[q[h][1]][q[h][2]+1][q[h][3]]:=2;
  end;
  if a[q[h][1]][q[h][2]][q[h][3]-1]=1 then begin
    inc(r);
    inc(t);
    q[t][1]:=q[h][1];
    q[t][2]:=q[h][2];
    q[t][3]:=q[h][3]-1;
    a[q[h][1]][q[h][2]][q[h][3]-1]:=2;
  end;
  if a[q[h][1]][q[h][2]][q[h][3]+1]=1 then begin
    inc(r);
    inc(t);
    q[t][1]:=q[h][1];
    q[t][2]:=q[h][2];
    q[t][3]:=q[h][3]+1;
    a[q[h][1]][q[h][2]][q[h][3]+1]:=2;
  end;
  inc(h);
end;
writeln(r);
end.